package cn.cy.behavior.observer.event.normal;

/**
 * @author yangxq
 * @desc
 * @date 2025-05-07
 */
public class PatternClient {

    public static void main(String[] args) {
        EventSource eventSource = new EventSource();
        ConcreteEventListener listener1 = new ConcreteEventListener("Listener 1");
        ConcreteEventListener listener2 = new ConcreteEventListener("Listener 2");

        eventSource.addListener(listener1);
        eventSource.addListener(listener2);

        eventSource.triggerEvent("Event 1");
        eventSource.triggerEvent("Event 2");
    }

}
